package com.zr.bili.Utils;

import com.google.gson.Gson;
import com.zr.bili.entity.Entity;

import static com.zr.bili.Utils.HttpUtils.doGet;

/**
 * @author zhangrui
 * @date 2020-04-12 10:51
 */
public class BiliUtils {
    public static String getSchool(int index) throws Exception {

        String url = "https://app.bilibili.com/x/v2/show/popular/selected?type=weekly_selected&number=";

        try {
            String result = doGet(url, index+"");
            //System.out.println(result);
            return result;
//            Gson gson = new Gson();
//            Entity entity = gson.fromJson(result, Entity.class);
//            System.out.println(entity.getData().getList().get(1).getTitle());


        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return "";
    }
}
